var fs = require('fs');
window.onload = function () {
    var btn = this.document.querySelector('#btn')
    var div = this.document.querySelector('#div')

    btn.onclick = function () {
        fs.readFile('texts.txt', (err, data) => {
            div.innerHTML = data;
        })
    }
}